import request from '@/utils/request'

export default {

  getAllChapterList(courseId) {
    return request({
      url: `/eduService/edu-chapter/getChapterVideo/${courseId}`,
      method: 'get'
    })
  },
  //增加章节
  addChapter(chapter) {
    return request({
      url: `/eduService/edu-chapter/addChapter`,
      method: 'post',
      data: chapter
    })
  },
  //获取章节
  getChapter(chapterId) {
    return request({
      url: `/eduService/edu-chapter/getChapterInfo/${chapterId}`,
      method: 'get'
    })
  },
  //修改
  updateChapter(chapter) {
    return request({
      url: `/eduService/edu-chapter/updateChapter`,
      method: 'post',
      data: chapter
    })
  },
  deleteChapter(chapterId){
    return request({
      url: `/eduService/edu-chapter/${chapterId}`,
      method: 'delete'
    })
  }
}
